package com.wthink.newMain.settings.config.inner.netconfig.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import com.wthink.hzgj.BR
import com.wthink.hzgj.R
import com.wthink.hzgj.util.adapter.AutoUpdatableAdapter
import com.wthink.hzgj.util.adapter.BaseViewHolder

open class NewNetConfigAdapter : AutoUpdatableAdapter<BaseViewHolder, NetConfig>({ o: NetConfig, n: NetConfig ->
    o.equals(n)
}) {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {

        val dataBinding = DataBindingUtil.inflate<ViewDataBinding>(
            LayoutInflater.from(parent.context),
            R.layout.item_new_netconfig,
            parent,
            false
        )

        return BaseViewHolder(dataBinding, BR.viewModel)
    }
}